#pragma once
#include <random>

namespace Extension
{
    class RandomUtil
    {
    public:
        inline static int generateInt(int min = 0, int max = 99);
        inline static double generateDouble(double min = 0.0, double max = 1.0);

    private:
        static std::random_device s_seeder;
    };

    std::random_device RandomUtil::s_seeder;

    inline int RandomUtil::generateInt(int min, int max)
    {
        std::mt19937 engine(s_seeder());
        std::uniform_int_distribution<int> distribution(min, max);
        return distribution(engine);
    }
    inline double RandomUtil::generateDouble(double min, double max)
    {
        std::mt19937 engine(s_seeder());
        std::uniform_real_distribution<double> distribution(min, max);
        return distribution(engine);
    }
}